package com.riant.controller;

import com.riant.bean.Person;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Classname PersonController
 * @Description TODO
 * @Date 2022/5/1 13:06
 * @Created by 张斌
 */
@Controller
public class PersonController {
    private final Logger logger = LoggerFactory.getLogger(TestController.class);

    /**
     * @ModelAttribute:针对form表单提交，
     * */
    @RequestMapping(path = {"/savePerson"})
    @ResponseBody
    public String save( Person person) {
        logger.info("person:{}",person);

        return "success";
    }
}
